]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Bind to the stage, not the monitor
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 10 Oct 2018 20:46:26 +0000 (17:46 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 25 Oct 2018 15:33:10 +0000 (12:33 -0300)
The switcher popup is a large, mostly transparent actor that
should cover all the clickable area of GNOME Shell. In Clutter
terms, it should cover the whole stage.

By binding it to the primary monitor, the Alt+Tab behavior
becomes a bit inconsistent. For example, by not hiding when
clicking at empty spaces at other monitors.

Fix that by binding the SwitcherPopup to the whole stage,
and not only the primary monitor.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/647

js/ui/switcherPopup.js

index 537a6af0c21f480faf8e17d97ce11b52f3ec9b19..1bef1af70d691038c12c87dcd369080d3c34ecda 100644 (file)
@@ -11,7 +11,6 @@ const Shell = imports.gi.Shell;
 const Signals = imports.signals;
 const St = imports.gi.St;
 
-const Layout = imports.ui.layout;
 const Main = imports.ui.main;
 const Tweener = imports.ui.tweener;
 
@@ -65,7 +64,10 @@ var SwitcherPopup = new Lang.Class({
         this._initialDelayTimeoutId = 0;
         this._noModsTimeoutId = 0;
 
-        this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
+        this.add_constraint(new Clutter.BindConstraint({
+            source: global.stage,
+            coordinate: Clutter.BindCoordinate.ALL,
+        }));
 
         // Initially disable hover so we ignore the enter-event if
         // the switcher appears underneath the current pointer location